package com.hh.balance.action;

import com.hh.balance.dto.UserBalanceDTO;
import com.hh.balance.entity.Balance;
import com.hh.balance.entity.User;
import com.hh.balance.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author tiger
 * @version 1.0
 * @data 2022/10/20 11:51
 */
public class UserAction {
    @Autowired
    private UserService userService;
    /**
     * 获取用户余额
     * @param userId
     * @return
     */
    @GetMapping(value = "/getUser/{userId}")
    public User getUser(@PathVariable int userId) {
        User user = userService.getById(userId);
        return user;
    }
}
